extends Bullet
class_name TeleportBullet

@export var teleport_offset:float = 16

func _ready() -> void:
	super._ready()
	body_entered.connect(teleport)

func teleport(body: Node2D) -> void:
	if body is TileMapLayer:
		return
	var dir = (shooter.global_position - body.global_position).normalized()
	shooter.global_position = body.global_position + dir * teleport_offset
